package com.cps.match.sdo;

public enum MatchValueType {
	EXACT, PHONETIC, NONE;

	public static MatchValueType fromValueOf(String v) {
		return MatchValueType.valueOf(v.toUpperCase());
	}

	public static boolean isValid(String v) {
		if (v == null) {
			return true;
		}
		if (v.equalsIgnoreCase("exact") 
				|| v.equalsIgnoreCase("phonetic") 
				|| v.equalsIgnoreCase("none")) {
			return true;
		}
		return false;
	}

	public String toString() {
		return this.name().toLowerCase();
	}

}
